import React from 'react'
import { useSelector  } from 'react-redux';
import { STORETYPE } from '../Type/Store.d';
import SumChildren from './SumChildren';

interface cHPROPSTYPE {
    fo?:number
}
function ChildrenItem(props:cHPROPSTYPE) {
    let { fo } = props;
    const childrenList = useSelector((state:STORETYPE)=>state.childrenList);
    
    return (
        <div className='ChildrenItem'>
            {
                childrenList.map((item,index)=>{
                    return <SumChildren item={item} key={index} fo={fo}></SumChildren>
                })
            }
        </div>
    )
}

export default ChildrenItem